<div class="popcom">
		<div class="bk">
					<ul class="bk_1 clearfix">
						<li>
							<table class="tableStyle">
								<thead>
									<tr>
										<th>替换图片</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>
										<!--{if $pic}-->
											<div id="replacepic">
											</div>
										<!--{else}-->
											<!--{$error}-->
										<!--{/if}-->
										</td>
									</tr>
								</tbody>
							</table>
						</li>
					</ul>
		</div>
		<div class="bt_bk2">
			<a href="javascript:void(0);" class="btn" onclick="$.tbox.close();return false;"><span>关闭</span></a>
		</div>
</div>
<!--{if $pic}-->
<script type="text/javascript">
function onReplacePic(id,filename,data) {
	if(data.err) {
		jAlert(data.err,"警告");
	} else {
		var picid = data.picid;
		var pic = data.msg+"_50x50.jpg?t="+new Date().getTime();
		$("#img_"+picid).attr("src",pic);
		$("#name_"+picid).text(data.name);
		$.tbox.close();
	}
}
$(function(){
	var uploader2 = new qq.FileUploader(
		{action:"<!--{url('admin','uploadfile','replacepic','picid=$pic.picid')}-->",
		 element: document.getElementById('replacepic'),
		 onComplete:onReplacePic}
	);
});
</script>
<!--{/if}-->



